#include <iostream>
#include <string>

int main() {
    std::string input;
    std::getline(std::cin, input);
    int size = 0;
    for (char character : input) {
        if (character == ' ') {
            size = 0;
        }
        else {
            size++;
        }
    }
    std::cout << size;
    return 0;
}
